home *** CD-ROM | disk | FTP | other *** search
/ Workbench Add-On / Workbench Add-On - Volume 1.iso / Dev / Oberon / Macros / DoOC.rexx < prev    next >
OS/2 REXX Batch file  |  1994-08-08  |  991b  |  46 lines

  1. /* DoOC - Compile an Oberon Module */
  2.  
  3. /* trace all */
  4. options results
  5.  
  6. if ~show('L','rexxsupport.library') then
  7.    call addlib('rexxsupport.library',0,-30)
  8. if ~show('L','RexxDosSupport.library') then
  9.    call addlib('RexxDosSupport.library',0,-30)
  10.  
  11. parse arg filename screenname
  12.  
  13. /* Construct the command line arguments. */
  14.  
  15. oc_args = GetVar("OC_ARGS")
  16.  
  17. ns = GetVar("OC_NEWSYMFILE")
  18. if ns = "YES" then
  19.   oc_args = oc_args "NS"
  20.  
  21. debug = GetVar("OC_DEBUG")
  22. if debug = "YES" then
  23.   oc_args = oc_args "DEBUG"
  24.  
  25. /* set up the console and stack */
  26.  
  27. call close 'STDERR'
  28. call open 'STDERR','NIL:','W'
  29. call close 'STDIN'
  30. call close 'STDOUT'
  31. /* specify your own window here... */
  32. call open 'STDOUT','CON:10/25/540/165/Compiling.../SCREEN'||screenname,'RW'
  33. call pragma '*','STDOUT'
  34. call pragma 'Stack', 10000
  35.  
  36. /* call the compiler */
  37.  
  38. address command 'OBERON-A:C/OC >* <*' oc_args filename
  39.  
  40. /* Check the return code here and call the error reporter if necessary */
  41.  
  42. if rc ~= 0 then
  43.   call ReadErr.aed
  44.  
  45.  
  46.